home *** CD-ROM | disk | FTP | other *** search
- /* assert.h standard header */
- #include <yvals.h>
-
- #if __MWERKS__
- #pragma options align=mac68k
- #endif
-
- #undef assert /* remove existing definition */
-
- #ifdef NDEBUG
- #define assert(test) ((void)0)
- #else /* NDEBUG not defined */
- _C_LIB_DECL
- void _Assert(char *);
- _END_C_LIB_DECL
- /* macros */
- #define _STR(x) _VAL(x)
- #define _VAL(x) #x
- #ifdef _VERBOSE_DEBUGGING
- #include <stdio.h>
- #define assert(test) ((test) ? (void)fprintf( \
- stderr, __FILE__ ":" _STR(__LINE__) " " #test " -- OK\n") \
- : _Assert(__FILE__ ":" _STR(__LINE__) " " #test))
- #else
- #define assert(test) ((test) ? (void)0 \
- : _Assert(__FILE__ ":" _STR(__LINE__) " " #test))
- #endif
-
- #endif
-
- #if __MWERKS__
- #pragma options align=reset
- #endif
-
- /*
- * Copyright (c) 1994 by P.J. Plauger. ALL RIGHTS RESERVED.
- * Consult your license regarding permissions and restrictions.
- */
-
-